<template>
    <div>
      <div style="height: 60px">题型：{{questionType.questionTypeName}}</div>
      <div>
        <QuestionFrom :questionTypeModeList="questionType.modes"></QuestionFrom>
      </div>
    </div>
</template>

<script>
  import qs from 'qs'
  import QuestionFrom from '../../components/question/QuestionForm'
  export default {
    name: "AddQuestion",
    components:{
      QuestionFrom:QuestionFrom,
    },
    data(){
      return{
        questionTypeId:57,
        questionType:{
          questionTypeName:'',
          modes:[]
        }
      }
    },
    created(){
      this.getQuestionType()
    },
    methods:{
      getQuestionType(){
        this.questionType.id=this.$route.query.id
        this.$axios.get('/questionType/getQuestionType',{
          params: {
            questionTypeId:this.questionTypeId
          }
        })
          .then(res=>{
            this.questionType=res.data.data
          })
          .catch(err=>{
            this.$message({
              message:'获取数据错误',
              type: 'error',
              duration: 3000
            })
          })
      }
    }
  }
</script>

<style scoped>

</style>
